﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace MainProject
{
    public partial class MainMDIPaarent : UTLBASEFORM.MDIPARENT
    {
#region "Private Variable"

        string strText = "Đang cập nhật";
        #endregion
        public MainMDIPaarent()
        {
            InitializeComponent();
        }

        private void MainMDIPaarent_Load(object sender, EventArgs e)
        {
            LoadMenu();
            LoadRate();
            SellProductsForm.frmSell frmSell = new SellProductsForm.frmSell();
            frmSell.UserLoginInfo = userLoginInfo;
            MDIChildShow(frmSell);
           // frmSell.Show();
        }

        private void LoadRate()
        {
            
        }      


        /// <summary>
        /// Show menu ung voi tung user
        /// </summary>
        private void LoadMenu()
        {
            //Show menu cha tab 1
            this.ShowTAB1("Quản Lý Sản Phẩm", null);
            //Show menu con tab 1
            this.ShowTAB1BTN1("Nhập Sản Phẩm", null);
            //show menu con tab 2
            this.ShowTAB2("Quản Lý Bán Hàng", null);
            this.ShowTAB2BTN1("Bán hàng", null);
            //show menu cha tab 3
            this.ShowTAB3("Quản Lý Tìm Kiếm", null);
            //show menu con tab 3
            this.ShowTAB3BTN1("Sản Phẩm", null);
            this.ShowTAB3BTN2("Đơn Hàng", null);
            this.ShowTAB3BTN3("Khách Hàng", null);
            this.ShowTAB3BTN4("Nhân Viên", null);
            //show menu con tab 4
            this.ShowTAB4("Quản Lý Tem", null);
            //show menu con tab 5
            this.ShowTAB5("Quản Lý Báo Cáo", null);
            //show menu con tab 6
            this.ShowTAB6("Quản Lý Khách Hàng", null);

            //show menu con tab 7
            this.ShowTAB7("Quản Lý Nhân Viên", null);
            //show button 1 cau tab 7
            this.ShowTAB7BTN1("Thông Tin Nhân Viên", null);
            this.ShowTAB7BTN2("Tìm Kiếm", null);

            //show menu con tab 8
            this.ShowTAB8("Quản Lý Hệ Thống", null);
            //show menu con tab 8
            this.ShowTAB8BTN1("Đơn Vị Tính", null);
            this.ShowTAB8BTN2("Cấu Hình Hệ Thống", null);


        }
        protected override void tab1btn1_Click(object sender, EventArgs e)
        {
            InputProductForm.frmInputProduct frminput = new InputProductForm.frmInputProduct();
            frminput.UserLoginInfo = userLoginInfo;
            MDIChildShow(frminput);
        }
        protected override void tab2btn1_Click(object sender, EventArgs e)
        {
            SellProductsForm.frmSell frmSell = new SellProductsForm.frmSell();
            frmSell.UserLoginInfo = userLoginInfo;
            MDIChildShow(frmSell);
        }

        /// <summary>
        /// Tim san pham
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected override void tab3btn1_Click(object sender, EventArgs e)
        {
            Search.frmSearch frmSearch = new Search.frmSearch();
            MDIChildShow(frmSearch);

        }
        /// <summary>
        /// Tim don hang
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected override void tab3btn2_Click(object sender, EventArgs e)
        {
            //base.tab3btn2_Click(sender, e);
            MessageBox.Show(strText, "Hồng Phúc");
        }
        /// <summary>
        /// Tim khach hang
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected override void tab3btn3_Click(object sender, EventArgs e)
        {
            //base.tab3btn3_Click(sender, e);
            MessageBox.Show(strText, "Hồng Phúc");
        }
        /// <summary>
        /// Tim nhan vien
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected override void tab3btn4_Click(object sender, EventArgs e)
        {
            //base.tab3btn4_Click(sender, e);
            MessageBox.Show(strText, "Hồng Phúc");
        }
       
        /// <summary>
        /// Event cho form quan ly nhan vien
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected override void tab7btn1_Click(object sender, EventArgs e)
        {
            EmployeeForm.frmEmployee _frmEmployee = new EmployeeForm.frmEmployee();
            MDIChildShow(_frmEmployee);
        }
        /// <summary>
        /// Event cho form fdon vi tinh
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected override void tab8btn1_Click(object sender, EventArgs e)
        {

            UnitForm.UnitForm _UnitForm = new UnitForm.UnitForm();
            _UnitForm.UserLoginInfo = userLoginInfo;
            MDIChildShow(_UnitForm);
        }
        /// <summary>
        /// Event cho form cau hinh
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected override void tab8btn2_Click(object sender, EventArgs e)
        {

            ConfigForm.ConfigForm _ConfigForm = new ConfigForm.ConfigForm();
            _ConfigForm.UserLoginInfo = userLoginInfo;
            MDIChildShow(_ConfigForm);
            
        }
    }
}